package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.user.UserRefreshBO;
import com.ymk.service.IUserRefreshService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户拉新表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-07-31
 */
@Service
public class UserRefreshService implements IUserRefreshService {

    @Override
    public UserRefreshBO get(Map param) {
    return this.daoRouter.queryForObject("UserRefresh.loadUserRefresh",param);
    }

    @Override
    public List<UserRefreshBO> list(Map param) {
        return this.daoRouter.query("UserRefresh.loadUserRefresh",param);
    }

    @Override
    public List<UserRefreshBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("UserRefresh.loadUserRefreshForPage",pagination);
    }

    @Override
    public void post(UserRefreshBO param) {
        this.daoRouter.insert("AUserRefresh.insertUserRefresh",param);
    }

    @Override
    public void update(UserRefreshBO param) {
        this.daoRouter.update("AUserRefresh.updateUserRefresh",param);
    }

    @Override
    public void del(UserRefreshBO param) {
        this.daoRouter.update("AUserRefresh.delUserRefresh",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
